﻿using System;
using System.Data.SQLite;
using System.Windows.Forms;

namespace MemprizeVocabulary
{
    static class Program
    {

        static void Main()
        {
            Database databaseObject = new Database();

            /**
             * INSERT INTO DATABASE
             * *
             */
            /*
            String query = "INSERT INTO Word ('englishWord', 'pron', 'chineseExp') VALUES(@englishWord, @pron, @chineseExp)";
            SQLiteCommand myCommand = new SQLiteCommand(query, databaseObject.myConnection);

            databaseObject.OpenConnection();
            myCommand.Parameters.AddWithValue("@englishWord", "abundance");
            myCommand.Parameters.AddWithValue("@pron", "əˈbʌndəns");
            myCommand.Parameters.AddWithValue("@chineseExp", "丰富，充裕；大量，极多；盈余；丰度；");
            var result = myCommand.ExecuteNonQuery();
            databaseObject.CloseConnection();
            */
            /**
             * SELECT FROM DATABASE
             * *
             */
            /*
            String query = "SELECT * FROM Word ORDER BY RANDOM() LIMIT 1";
            SQLiteCommand myCommand = new SQLiteCommand(query, databaseObject.myConnection);

            databaseObject.OpenConnection();
         
            SQLiteDataReader result = myCommand.ExecuteReader();
            if (result.HasRows)
            {
                while (result.Read())
                {
                    Console.WriteLine("EnglishWord:{0};prononciation:{1};ChineseMeaning:{2}", result["englishWord"], result["pron"], result["chineseExp"]);

                }
            }
            databaseObject.CloseConnection();

            */
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());

        }
    }
}
